package com.xls.aclservice.feign;

import com.xls.commonutils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "service-minio")
public interface OssFileService {

    @PostMapping(value = "/minio/oss/upload/avatar", consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
    Result<String> uploadAvatar(@RequestPart("file") MultipartFile file);

    @PostMapping(value = "/minio/oss/remove/avatar")
    Result<String> removeAvatar(@RequestParam("filename") String filename);

}
